<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('操作日志详情')" />
	<th:block th:include="include :: jsonview-css" />
	<style type="text/css">
		.layui-input-block{padding-top: 10px;}
		.layui-form-item{margin-bottom: 0px;}
		.layui-form-label {
			width: 120px;
			padding: 10px -0px 0px 10px;
		}
		.paramstyle {
			display: block;
			padding: 9.5px;
			margin: 0 0 10px 20px;
			font-size: 13px;
			line-height: 1.42857143;
			color: #333;
			word-break: break-all;
			word-wrap: break-word;
			background-color: #f5f5f5;
			border: 1px solid #ccc;
			border-radius: 4px;
		}
	</style>
</head>
<body>
 <form class="layui-form" id="jobLogForm" style="padding: 5px 20px 10px 30px;">
	<div class="layui-form-item">
		<label class="layui-form-label">操作模块：</label>
		<div class="layui-input-block" th:text="${operLog?.title}">
		</div>
	</div>
	 <div class="layui-form-item">
		 <label class="layui-form-label">操作类型：</label>
		 <div class="layui-input-block" th:text="${operLog?.businessType}">
		 </div>
	 </div>
	<div class="layui-form-item">
		<label class="layui-form-label">登录信息：</label>
		<div class="layui-input-block" th:text="${operLog?.operName} + ' / ' + ${operLog?.deptName} + ' / ' + ${operLog?.operIp}+ ' / ' + ${operLog?.operLocation}">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">请求地址：</label>
		<div class="layui-input-block" th:text="${operLog?.operUrl}">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">操作方法：</label>
		<div class="layui-input-block" th:text="${operLog?.method}">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">请求参数：</label>
		<div class="layui-input-block"><span class="paramstyle" id="operParam"></span>
		</div>
	</div>
	<div class="layui-form-item">
	    <label class="layui-form-label">返回参数：</label>
		<div class="layui-input-block"><span class="paramstyle" id="jsonResult"></span>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">状态：</label>
		<button type="button" th:class="${operLog.status == 0 ? 'layui-btn layui-btn-xs' : 'layui-btn layui-btn-xs layui-btn-danger'}" style="margin-top: 8px;" th:text="${operLog.status == 0 ? '正常' : '异常'}">
		</button>
	</div>
	<div class="layui-form-item" th:style="'display:' + ${operLog.status == 0 ? 'none' : 'block'}">
		<label class="layui-form-label">异常信息：</label>
		<div class="layui-input-block" th:text="${operLog?.errorMsg}">
		</div>
	</div>
 </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: jsonview-js" />
<script th:inline="javascript">
	$(function() {
		var operParam = [[${operLog.operParam}]];
		if ($.common.isNotEmpty(operParam) && operParam.length < 2000) {
			$("#operParam").JSONView(operParam);
		} else {
			$("#operParam").text(operParam);
		}
		var jsonResult = [[${operLog.jsonResult}]];
		if ($.common.isNotEmpty(jsonResult) && jsonResult.length < 2000) {
			$("#jsonResult").JSONView(jsonResult);
		} else {
			$("#jsonResult").text(jsonResult);
		}
	});
</script>
</body>
</html>